package org.xiao.boot.starter.example;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;

@SpringBootApplication
public class StarterWebApplication extends SpringBootServletInitializer{

	public static void main(String[] args) {
		SpringApplication.run(StarterWebApplication.class, args);
	}
	
	/**
	 * 支持tomcat方式运行springboot的web应用
	 */
	@Override
	protected SpringApplicationBuilder configure(SpringApplicationBuilder builder){
		return builder.sources(StarterWebApplication.class);
	}

}
